<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:CPPEI.WPF">

    <local:MultiConverter x:Key="multiConverter"/>

    <Style TargetType="{x:Type local:CustomControl1}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type local:CustomControl1}">
                    <Border Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}">
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="{x:Type local:MainSubSplitContainer}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type local:MainSubSplitContainer}">
                    <Canvas Name="root">
                        <!--<VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Sub">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0:0:1" From="0" To="500" Storyboard.TargetProperty="(Canvas.Left)" Storyboard.TargetName="mainViewContainer"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Main">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0:0:1" From="1" To="500" Storyboard.TargetProperty="(FrameworkElement.Width)" Storyboard.TargetName="mainViewContainer"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>-->
                        <Grid Name="subViewContainer" Width="{TemplateBinding SubViewWidth}" 
                              Height="{Binding Path=ActualHeight,ElementName=root}" Visibility="Hidden">
                            <ContentPresenter Content="{TemplateBinding SubView}"/>
                        </Grid>
                        <Grid Name="mainViewContainer" Width="{Binding Path=ActualWidth,ElementName=root}"
                              Height="{Binding Path=ActualHeight,ElementName=root}">
                            <ContentPresenter Content="{TemplateBinding MainView}"/>
                        </Grid>
                        <Rectangle Name="subViewVisual" Visibility="Hidden"
                                   Width="{TemplateBinding SubViewWidth}" 
                                   Height="{Binding Path=ActualHeight,ElementName=root}">
                            <Rectangle.Fill>
                                <VisualBrush Visual="{Binding ElementName=subViewContainer}"/>
                            </Rectangle.Fill>
                        </Rectangle>
                        <Rectangle Name="mainViewVisual" Visibility="Hidden"
                                   Width="{Binding Path=ActualWidth,ElementName=root}"
                                   Height="{Binding Path=ActualHeight,ElementName=root}">
                            <Rectangle.Fill>
                                <VisualBrush Visual="{Binding ElementName=mainViewContainer}"/>
                            </Rectangle.Fill>
                            <Rectangle.RenderTransform>
                                <ScaleTransform ScaleX="1.0" ScaleY="1.0" CenterX="0.5" CenterY="0.5" />
                            </Rectangle.RenderTransform>
                        </Rectangle>
                    </Canvas>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    
</ResourceDictionary>
